Skip to content

[CALCITE-6537] Add syntax to allow non-aggregated rows to be used in GROUPING SETS - #5208

Open
xuzifu666 wants to merge 1 commit into
apache:mainfrom
xuzifu666:calcite-6537
Open

xuzifu666 wants to merge 1 commit into
apache:mainfrom
xuzifu666:calcite-6537

Conversation

@xuzifu666

Copy link
Copy Markdown
Member

# End agg.iq

# [CALCITE-6537] Add syntax to allow non-aggregated rows to be used in GROUPING SETS
# non-aggregated (detail) rows. Requires LENIENT conformance.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not standard SQL and is not supported by mainstream databases, it was converted to equivalent PostgreSQL syntax for verification; the results matched expectations: https://onecompiler.com/postgresql/44yz6y5r4

@sonarqubecloud

Copy link
Copy Markdown

*
* @see org.apache.calcite.sql.validate.SqlConformance#isGroupingSetsStarAllowed()
*/
class GroupingSetsStarTest {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these tests duplicate the quidem tests, they are not necessary


# End agg.iq

# [CALCITE-6537] Add syntax to allow non-aggregated rows to be used in GROUPING SETS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the parser uses a stack for grouping star, so it seems to support nested * calls. Are there unit tests for these cases?

We should either have unit tests for the full language supported, or support a more restricted form of the language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants